macro(recursive_subdirs result basedir)
    file(GLOB_RECURSE children LIST_DIRECTORIES true ${basedir}/*)
    set(dirlist ${basedir})
    foreach(child ${children})
        if (IS_DIRECTORY ${child})
            list(APPEND dirlist ${child})
        endif()
    endforeach()
    set(${result} ${dirlist})
endmacro()
